﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace IRepository
{
    public interface IBaseRepository<TEntity> where TEntity : class
    {
        void Insert(TEntity entity);
        void Delet(TEntity entity);
        void Update(TEntity entity);
        TEntity Load(params object[] keyValues);
        IEnumerable<TEntity> GetWithRawSql(string query, params object[] parameters);
        List<TEntity> All();
        IEnumerable<TEntity> Get(Expression<Func<TEntity, bool>> filter = null, Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> orderBy = null, string includeProperties = "");
    }
}
